<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class CreditsAdminOplogRequest extends FormRequest
{
    use CommonRequest;
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return self::baseRules();
    }

    public function messages()
    {

        return self::baseMessages();
    }

    public static function baseRules()
    {
        $rule = [
            'id' => 'required|integer|min:1',
        ];

        return $rule;
    }

    public static function baseMessages()
    {
        $message = [
            'id.required' => 'ID必传项',
            'id.integer' => 'ID类型为整数',

        ];

        return $message;
    }
}
